#include <P2PServerApp.h>
//#include <JabberSubsystem.h>
//#include <Network/NetworkSubsystem.h>
//#include <SMSSubsystem.h>
//#include <AuthenticationSubsystem.h>
//#include <Financial/FinancialSubsystem.h>
//#include <Database/DatabaseSubsystem.h>
#include <UDTSubsystem.h>
#include <Network/NetworkSubsystem.h>

#include <ApplicationStartingNotification.h>
#include <StopRootApplicationNotification.h>
#include <Poco/NotificationCenter.h>
#include <Poco/NObserver.h>
#include <Poco/FileChannel.h>
#include <Poco/Logger.h>
#include <Poco/Format.h>



#include "Poco/Util/ServerApplication.h"

#include "Poco/Util/Option.h"
#include "Poco/Util/OptionSet.h"
#include "Poco/Util/HelpFormatter.h"
#include <iostream>


using namespace Poco::Util;
P2PServerApp::P2PServerApp(void)
//:iStopEvent("StopRootApplicationEvent")
//,_helpRequested(false)
//,iStopRunningServer(false)
{
}

P2PServerApp::~P2PServerApp(void)
{
}

void P2PServerApp::RegisterSubsystemClasses()
{
	iSubSystemFactory.registerClass<UDTSubsystem>("UDTSubsystem");
	iSubSystemFactory.registerClass<Network::NetworkSubsystem>("NetworkSubsystem");
}

int main(int argc, char** argv)
{

	std::cout<<"udt server started..." << std::endl;
	P2PServerApp aApp2;

	return aApp2.run(argc , argv);
//return 0;	

	
} 
//POCO_SERVER_MAIN(P2PServerApp)

